<!--
*Author：jxx
 *Contact：283591387@qq.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/mall/CampsitePeopleLabel.js此处编写
 -->
<template>
  <div>
    <view-grid ref="grid" :columns="columns" :detail="detail" :editFormFields="editFormFields"
      :editFormFileds="editFormFields" :editFormOptions="editFormOptions"
      :searchFormFields="searchFormFields" :searchFormFileds="searchFormFields"
      :searchFormOptions="searchFormOptions" :table="table" :extend="extend">
    </view-grid>
  </div>
</template>

<script>
import extend from "@/extension/mall/CampsitePeopleLabel.js";
import ViewGrid from "@/components/basic/ViewGrid.vue";
var vueParam = {
  components: {
    ViewGrid,
  },
  data() {
    return {
      table: {
        key: "id",
        footer: "Foots",
        cnName: "营员标签",
        name: "CampsitePeopleLabel",
        url: "/CampsitePeopleLabel/",
        sortName: "createDate",
      },
      extend: extend,
      editFormFields: {
        isAuto: "",
        name: "",
        cWhere: "",
        joinNumStart: "",
        joinNumEnd: "",
        moneyStart: "",
        moneyEnd: "",
        relationStart: "",
        relationEnd: "",
        creator: "",
        createID: "",
        createDate: "",
        modifier: "",
        modifyID: "",
        modifyDate: "",
        isJoin: '',
        isMoney: '',
        isRelation: '',
      },
      editFormOptions: [
        [{ title: "标签名称", field: "name", type: "text", colSize: 6 }],
        [
          {
            title: "标签类型",
            field: "isAuto",
            type: "radio",
            data: [
              {
                value: "手动标签",
                key: 0,
              },
              {
                value: "自动标签",
                key: 1,
              },
            ],
            extra: {
              render: (h) => {
                return h(
                  "span",
                  {},
                  "自动标签更改打标条件后，现有营员拥有的此标签将被自动清除"
                );
              },
            },
            colSize: 12,
          },
        ],
        [
          {
            title: "满足条件",
            field: "cWhere",
            type: "radio",
            data: [
              {
                value: "满足任意一个被选中的条件即可",
                key: 0,
              },
              {
                value: "必须满足所有被选中的条件",
                key: 1,
              },
            ],
            colSize: 12,
            hidden: true,
          },
        ],
        [
          {
            title: "交易条件",
            field: "tradeTerm",
            type: "header",
            hidden: true,
          },
        ],
        [
          {
            title: "",
            field: "isJoin",
            field1: "joinNumStart",
            field2: "joinNumEnd",
            type: "textSpanCheck",
            cont: ["累计参营次数", "次","减", "次"],
            colSize: 12,
            hidden: true,
          },
        ],
        [
          {
            title: "",
            field: "isMoney",
            field1: "moneyStart",
            field2: "moneyEnd",
            type: "textSpanCheck",
            cont: ["累计消费金额", "元","减", "元"],
            colSize: 12,
            hidden: true,
          },
        ],
        [
          {
            title: "",
            field: "isRelation",
            field1: "relationStart",
            field2: "relationEnd",
            type: "textSpanCheck",
            cont: ["熟人关系数量", "人","减", "人"],
            colSize: 12,
            hidden: true,
          },
        ],
        // [
        //   {
        //     title: "",
        //     field: "joinNumStart",
        //     type: "textSpan",
        //     cont: ["累计参营次数", "次"],
        //     colSize: 5,
        //     hidden: true,
        //   },
        //   {
        //     title: "",
        //     field: "joinNumEnd",
        //     type: "textSpan",
        //     cont: ["减", "次"],
        //     colSize: 4,
        //     hidden: true,
        //   },
        // ],
        // [
        //   {
        //     title: "",
        //     field: "moneyStart",
        //     type: "textSpan",
        //     cont: ["累计消费金额", "元"],
        //     colSize: 5,
        //     hidden: true,
        //   },
        //   {
        //     title: "",
        //     field: "moneyEnd",
        //     type: "textSpan",
        //     cont: ["减", "元"],
        //     colSize: 4,
        //     hidden: true,
        //   },
        // ],
        // [
        //   {
        //     title: "",
        //     field: "relationStart",
        //     type: "textSpan",
        //     cont: ["熟人关系数量", "人"],
        //     colSize: 5,
        //     hidden: true,
        //   },
        //   {
        //     title: "",
        //     field: "relationEnd",
        //     type: "textSpan",
        //     cont: ["减", "人"],
        //     colSize: 4,
        //     hidden: true,
        //   },
        // ],
      ],
      searchFormFields: { name: "" },
      searchFormOptions: [[{ title: "标签名称", field: "name" }]],
      columns: [
        {
          field: "name",
          title: "标签名称",
          type: "string",
          width: 220,
          align: "left",
        },
        //     {field:'campPeople',title:'营员负键',type:'int',width:90,align:'left',sortable:true},
        //    {field:'createDate',title:'创建时间',type:'datetime',width:90,align:'left',sortable:true},
        //    {field:'createID',title:'创建人id',type:'int',width:90,hidden:true,align:'left'},
        //    {field:'creator',title:'创建人',type:'string',width:220,align:'left'},
        {
          field: "cWhere",
          title: "满足条件",
          type: "int",
          width: 90,
          align: "left",
          bind: {
            key: "",
            data: [
              {
                value: "单项满足",
                key: 0,
              },
              {
                value: "都满足",
                key: 1,
              },
            ],
          },
        },
        //    {field:'id',title:'id',type:'int',width:90,hidden:true,readonly:true,require:true,align:'left'},
        {
          field: "isAuto",
          title: "手动自动",
          type: "int",
          bind: {
            key: "",
            data: [
              {
                value: "手动标签",
                key: 0,
              },
              {
                value: "自动标签",
                key: 1,
              },
            ],
          },
          width: 90,
          align: "left",
        },
        //    {field:'joinNumEnd',title:'参加营地次数截止',type:'int',width:90,align:'left'},
        //    {field:'joinNumStart',title:'参加营地次数起始',type:'int',width:90,align:'left'},
        //    {field:'modifier',title:'修改人',type:'string',width:220,align:'left'},
        //    {field:'modifyDate',title:'修改时间',type:'datetime',width:90,align:'left',sortable:true},
        //    {field:'modifyID',title:'修改人id',type:'int',width:90,hidden:true,align:'left'},
        //    {field:'moneyEnd',title:'消费金额截止',type:'decimal',width:90,align:'left'},
        //    {field:'moneyStart',title:'消费金额起始',type:'decimal',width:90,align:'left'},

        //    {field:'relationEnd',title:'熟人关系截止',type:'int',width:90,align:'left'},
        //    {field:'relationStart',title:'熟人关系起始',type:'int',width:90,align:'left'},
        //    {field:'uid',title:'guid',type:'string',width:90,align:'left'}
      ],
      detail: {
        cnName: "#detailCnName",
        columns: [],
        sortName: "",
        key: "",
      },
    };
  },
};
export default vueParam;
</script>
